package com.jy.it.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jy.it.dao.UserDao;
import com.jy.it.entity.User;
import com.jy.it.service.UserService;
@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private UserDao dao;
	@Override
	public User login(String userno, String userpwd) {
		User u=dao.login(userno,userpwd);
		return u;
	}
	@Override
	public User findById(int userid) {
		return dao.selectById(userid);
	}
	@Override
	public int add(String username, String userno, String userdriverno, String userpwd, String imgname,
			String userphone, String useremail, String useraddress) {
		
		return dao.insert(username,userno,userdriverno,userpwd,imgname,userphone,useremail,useraddress);
	}
	
}
